var app = getApp();
Page({
  data: {
    winHeight: "",//窗口高度
    currentTab: 0, //预设当前项的值
    scrollLeft: 0, //tab标题的滚动条位置
    mot:false,
    titleName:"情绪管理",
    complete: [
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      },
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      },
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      },
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      },
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      },
      {
        imgUrl: "../../../images/pic1.jpg",
        title: "小蝌蚪找妈妈"
      }
    ],
    complete1:[
      "成长教育", "品格培养", "情绪管理", "科学启蒙", "成长教育", "品格培养", "情绪管理", "成长教育", "品格培养", "情绪管理"
    ]
  },
  
  onLoad: function () {
    var that = this;
    //  高度自适应
    wx.getSystemInfo({
      success: function (res) {
        var clientHeight = res.windowHeight,
          clientWidth = res.windowWidth,
          rpxR = 750 / clientWidth;
        var calc = clientHeight * rpxR;
        console.log(calc)
        that.setData({
          winHeight: calc
        });
      }
    });
  },
  classif:function(e){
    // console.log(e.currentTarget.dataset.content)
    this.setData({
      titleName: e.currentTarget.dataset.content,
      mot: false
    })
    
  },
  goMotai:function(e){
    // console.log(e.currentTarget.dataset.text)
    var text = e.currentTarget.dataset.text
    var arr = this.data.complete1 
      
      this.setData({
          mot: true,
      })
      
     
  },
  footerTap: app.footerTap
})